package net.zjitc.service.product.productServiceImpl;

import net.zjitc.dao.product.ProductDao;
import net.zjitc.dao.product.productDaoImpl.ProductDaoImpl;
import net.zjitc.domain.Product;
import net.zjitc.service.product.ProductService;

import java.util.List;

/**
 * Created by hasee on 2017/10/18.
 */
public class ProductServiceImpl implements ProductService {
    @Override
    public List<Product> findAll() {
        ProductDao dao = new ProductDaoImpl();
        return dao.findAll();
    }

    @Override
    public Product findById(String id) {
        ProductDao dao = new ProductDaoImpl();
        return dao.findById(id);
    }

    @Override
    public List findByKeyword(String keyword) {
        ProductDao dao = new ProductDaoImpl();
        return dao.findByKeyWord(keyword);
    }
}
